<?php
//if (!defined('MAKEPOLL_ROOT')) define('MAKEPOLL_ROOT', "http://novak.lcc.gatech.edu/projects/whyPoll/makepoll/");
//if (!defined('MAKEXML_ROOT')) define('MAKEXML_ROOT', "../../kinoPuzzle/videosubmit/");

$db_host = "localhost";
$db_database = "nia";
$db_username = "nia";
$db_password = "nia123";

$connection = mysql_connect(
	$db_host,
	$db_username,
	$db_password
);

if(!$connection)
{
	echo "error connecting to database";
	die("Error connecting to the database.<br/><br/>".mysql_error());
}

$db_select = mysql_select_db($db_database);

if(!$db_select)
{
	echo "error with select";
	die("Error with select.<br/><br/>".mysql_error());
}

function queryserver($query)
{
	if($result = mysql_query($query))
	{
		return mysql_insert_id();
	}
	else
	{
		echo "Query failed: '".$query."'";
	}
}

?>